package com.lxc.demos.opensource.c2dm;

import com.lxc.demos.SampleApplication;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;

public class C2DMActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		Log.d(SampleApplication.TAG,"<--C2DMActivity.onCreate-->");
		getMsg();

	}

	@Override
	protected void onRestoreInstanceState(Bundle savedInstanceState) {
		super.onRestoreInstanceState(savedInstanceState);
		Log.d(SampleApplication.TAG,"<--C2DMActivity.onRestoreInstanceState-->");
	}

	@Override
	protected void onPostCreate(Bundle savedInstanceState) {
		super.onPostCreate(savedInstanceState);
		Log.d(SampleApplication.TAG,"<--C2DMActivity.onPostCreate-->");
	}

	@Override
	protected void onStart() {
		super.onStart();
		Log.d(SampleApplication.TAG,"<--C2DMActivity.onStart-->");
	}

	@Override
	protected void onRestart() {
		super.onRestart();
		Log.d(SampleApplication.TAG,"<--C2DMActivity.onRestart-->");
	}

	@Override
	protected void onResume() {
		super.onResume();
		Log.d(SampleApplication.TAG,"<--C2DMActivity.onResume-->");
	}

	@Override
	protected void onPostResume() {
		super.onPostResume();
		Log.d(SampleApplication.TAG,"<--C2DMActivity.onPostResume-->");
	}

	@Override
	protected void onNewIntent(Intent intent) {
		super.onNewIntent(intent);
		Log.d(SampleApplication.TAG,"<--C2DMActivity.onNewIntent-->");
		
	}

	@Override
	protected void onSaveInstanceState(Bundle outState) {
		super.onSaveInstanceState(outState);
		Log.d(SampleApplication.TAG,"<--C2DMActivity.onSaveInstanceState-->");
	}

	@Override
	protected void onPause() {
		super.onPause();
		Log.d(SampleApplication.TAG,"<--C2DMActivity.onPause-->");
	}

	@Override
	protected void onStop() {
		super.onStop();
		Log.d(SampleApplication.TAG,"<--C2DMActivity.onStop-->");
	}

	@Override
	protected void onDestroy() {
		super.onDestroy();
		Log.d(SampleApplication.TAG,"<--C2DMActivity.onDestroy-->");
	}
	
	
	private void getMsg(){
		Intent intent = getIntent();
		String msg = intent.getStringExtra("msg");
		Toast.makeText(this, msg, Toast.LENGTH_LONG).show();
	}

}
